package com.erb.mapper;

import com.erb.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OtherMapper {
	int updateUserBalance(@Param("id") int id, @Param("balance") Double balance);

	int addCapitalLog(CapitalLog capitalLog);

	int updateProductHaveMoney(@Param("id") int id, @Param("haveMoney") Double haveMoney);

	List<Invest> findInvestByPro(@Param("startPage") int startPage, @Param("pageSize") int pageSize, @Param("pid") int pid);

	int findTotalInvestByPro(int pid);

	int findPayPassByUid(int uid);

	User findUserById(int id);

	int countInvest(int uid);

	int updateProductStatus(@Param("pid") int pid, @Param("status") int status);

	List<UserCount> topFiveInvest();

	List<UserCount> topFiveProfit();

	Redpacketrecord findRedById(int rid);

	List<Redpacketrecord> findRedByUser(@Param("uid") int uid, @Param("rtype") Integer rtype, @Param("ptype") Integer ptype, @Param("state") Integer state);

	int updateRedState(@Param("id") int id, @Param("state") int state, @Param("exchangeTime") String exchangeTime);

	Double sumProfit();

	Integer todayExchange(@Param("uid") int uid, @Param("gid") int gid);

	int addRecord(IntegralGoodsRecord record);

	int addRedPacket(Redpacketrecord redpacketrecord);

	Integer userIntegral(int uid);

}
